<template>
  <div class="wrap">
    <!-- 页头区域 -->
    <!-- <div class="wrap_head head_white">
      <div class="icon_menu">
        <a class="i_menu"></a>
        <a class="i_close"></a>
      </div>
      <div class="bg_hover"></div>
    </div> -->
    <!-- 页头区域 -->

    <div class="header-seat"></div>
    <div class="null_content">
      <!-- 内容区域 -->
      <div class="f">
        <div class="crumbs-1">
          <div class="f-content">
            <a @click="openHomePage">首页</a
            ><img :src="require('@/assets/df4s4.png')" />
            <a @click="openNewstPage">新闻中心</a
            ><img :src="require('@/assets/df4s4.png')" />
            <a>文章详情</a>
          </div>
        </div>
        <div class="page-main">
          <div class="f-content">
            <div class="page-content">
              <article>
                <div class="title-3">
                  <h1 class="main">今日铝价格查询_各地最新铝市场报价</h1>
                  <!-- <div class="date">{{ articleDetail.date }}</div> -->
                </div>
                <div class="data">
                  <el-table :data="tableData" border style="width: 100%">
                    <el-table-column prop="date" label="地区">
                    </el-table-column>
                    <el-table-column prop="name" label="产品名称">
                    </el-table-column>
                    <el-table-column prop="province" label="产品价格">
                    </el-table-column>
                    <el-table-column prop="city" label="价格单位">
                    </el-table-column>
                  </el-table>
                </div>
              </article>
            </div>
            <div class="both"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import axios from "@/utils/HttpUtils";
export default {
  data() {
    return {
      tableData: [
        {
          date: "华东现货",
          name: "A00铝",
          province: "18350",
          city: "元/吨",
        },
        {
          date: "长江",
          name: "电解铝",
          province: "18350",
          city: "元/吨",
        },
        {
          date: "南储",
          name: "氧化铝",
          province: "18350",
          city: "元/吨",
        },
        {
          date: "佛山",
          name: "铝材 阳极氧化铝",
          province: "18350",
          city: "元/吨",
        },
      ],
    };
  },
  watch: {
    $route: "getNewsParams",
  },
  created() {
    console.log("跳转展示详情页函数...");
    // this.getNewsParams();
  },

  methods: {
    getNewsParams() {
      // 取到路由带过来的参数
      const routerParams = this.$route.query.id;
      console.log("detail get id:" + routerParams);
      // 将数据放在当前组件的数据内
      this.articleDetail.id = routerParams;
      this.getNewDetail(this.articleDetail.id);
    },
    openHomePage() {
      this.$router.push({ name: "home" });
    },
    openNewstPage() {
      this.$router.push({ name: "news" });
    },
    getNewDetail(id) {
      console.log("加载文章详情。。。");
      let pageUrl = "/news/news-detail";
      let params = {};
      params.id = id;
      var data = axios.get(pageUrl, params);
      console.log(data);
      this.news.push();
    },
    getRelationNewsList() {
      let pageUrl = "/news/news-relation";
      let params = {};
      params.pageNo = 1;
      params.pageSize = 3;
      var data = axios.get(pageUrl, params);
      console.log(data);
      this.news.push();
    },
  },
  mounted() {},
};
</script>

<style scoped>
@import "~@/assets/css/articles_2.css";
@import "~@/assets/css/base.css";
@import "~@/assets/css/index.css";
@import "~@//assets/css/base-2.css";
.look-more {
  cursor: pointer;
}
</style>